{% extends "zerver/portico.html" %}
{% set entrypoint = "dev-help" %}

{% block title %}
<title>Help center server not running | Zulip Dev</title>
{% endblock %}

{% block portico_content %}

<div class="dev-help-page flex">
    <div class="white-box markdown">
        {% if mdx_file_exists %}
            <h2 class="dev-help-header">Help center server not running</h2>
            <p>
                To minimize resource requirements for the development
                environment, the help center's development server does
                not run by default. Below are our recommendations for
                accessing this help center page:
            </p>
            <ul>
                <li>
                    <b>Quick reference</b>: If you aren't planning to modify the help center, you can
                    <a target="_blank" rel="noopener noreferrer"
                      href="https://zulip.com/help/{{ subpath }}">view it on
                    zulip.com</a>. Pages may be slightly behind the version
                    currently in <code>main</code>.
                </li>
                <li>
                    <b>Up-to-date reference</b>: You can
                    <a target="_blank" rel="noopener noreferrer" href="{{
                      raw_url }}">view the current raw MDX file</a>, which is recommended for documentation
                    that touches brand new or recently modified features.
                </li>
                <li>
                    <b>Modifying the help center</b>:
                    {% include "zerver/development/help_center_instructions_macro.html" %}
                </li>
            </ul>
        {% else %}
            <p class="invalid-path-error">
                This is not a valid help path and not a valid MDX file. Please re-check the URL subpath you have provided.
            </p>
        {% endif %}

        <div class="dev-help-actions">
            {% if mdx_file_exists %}
                <a target="_blank" rel="noopener noreferrer" href="https://zulip.com/help/{{ subpath }}" class="dev-help-action-button">
                    View page on zulip.com
                </a>
                <a target="_blank" rel="noopener noreferrer" href="{{ raw_url }}" class="dev-help-action-button">
                    View page source
                </a>
            {% endif %}
        </div>
    </div>
</div>
{% endblock %}
